-- GENERATED SPELL FOR [High Protector Tarsen] --


function spell0_1845(pUnit, Event) --@Arcane Blast,n/a--
pUnit:FullCastSpellOnTarget(10833,pUnit:GetMainTank ())
pUnit:RegisterEvent('Sorts_1845', 544, 1)
end

function spell1_1845(pUnit, Event) --@Devotion Aura,Self--
pUnit:FullCastSpellOnTarget(8258,pUnit)
pUnit:RegisterEvent('Sorts_1845', 609, 1)
end

function spell2_1845(pUnit, Event) --@Holy Strike,n/a--
pUnit:FullCastSpellOnTarget(13953,pUnit:GetMainTank ())
pUnit:RegisterEvent('Sorts_1845', 623, 1)
end

function spell3_1845(pUnit, Event) --@Shield Slam,n/a--
pUnit:FullCastSpellOnTarget(8242,pUnit:GetMainTank ())
pUnit:RegisterEvent('Sorts_1845', 2254, 1)
end

function Sorts_1845(pUnit, Event)
local choix_sorts_1845 = math.random(0, 3)
if choix_sorts_1845 == 0 then
pUnit:RegisterEvent('spell0_1845', 1, 1)
end
if choix_sorts_1845 == 1 then
pUnit:RegisterEvent('spell1_1845', 1, 1)
end
if choix_sorts_1845 == 2 then
pUnit:RegisterEvent('spell2_1845', 1, 1)
end
if choix_sorts_1845 == 3 then
pUnit:RegisterEvent('spell3_1845', 1, 1)
end
end

function mob1845_Action(pUnit, Event)
pUnit:RegisterEvent('Sorts_1845', math.random(1500, 3000), 1)
end

function mob1845_Leave(pUnit, Event)
--pUnit:RemoveEvents();--
end

function mob1845_Kill(pUnit, Event)
--pUnit:RemoveEvents();--
end

function mob1845_Die(pUnit, Event)
pUnit:RemoveEvents();
end

RegisterUnitEvent(1845, 1, 'mob1845_Action')
RegisterUnitEvent(1845, 2, 'mob1845_Leave')
RegisterUnitEvent(1845, 3, 'mob1845_Kill')
RegisterUnitEvent(1845, 4, 'mob1845_Die')
